Repository navigation
feat(FEAT-LOOP-2026-0250): record verification gate results and durations - #3598
Merged
Merged
Conversation
…ions Draft the feature: one gate, four units and a terminal close. Each verification gate run (attempt, baseline probe, broad run) emits a gate_result event with its outcome and duration, attempt_outcome gains agent_seconds and verify_seconds, and `specfuse stats` reports the agent/verify split per feature and the slowest gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Feature: FEAT-LOOP-2026-0250
Feature: FEAT-LOOP-2026-0250
…2026-0250/T01 — awaiting_review Feature: FEAT-LOOP-2026-0250
…te 1 The drafted detail section had no `<a id="feat-loop-2026-0250">` anchor, so the row's `[→ detail]` link did not resolve. roadmap-link-gate and the two real-tree roadmap tests failed on every run, which the baseline probe read as a pre-existing failure and halted gate 1 after T01's first attempt. T01's code was not at fault; it is back at attempts 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Feature: FEAT-LOOP-2026-0250
Feature: FEAT-LOOP-2026-0250/T01
Feature: FEAT-LOOP-2026-0250/T02
… run Feature: FEAT-LOOP-2026-0250/T03
… docs Feature: FEAT-LOOP-2026-0250/T04
Feature: FEAT-LOOP-2026-0250
…pen it The broad run before G1-CLOSE failed four tests the per-unit narrow tier never ran: - test_gate_timings.TestNothingExistingChanges.test_emitted_events_validate passed alone but failed in the full suite: validate_event caches driver event types at module level, and an earlier test left the cache empty. Pin the real packaged schemas and reset the caches, as test_event_gate_full_envelope does, and drain the phase-result global. - Three docs-sync tests: T04 edited docs/methodology.md without its packaged copy. Ran scripts/sync-scaffold.sh. scripts/smoke-test.sh OK: 5101 tests (4 skipped), lint, security, coverage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Feature: FEAT-LOOP-2026-0250
Feature: FEAT-LOOP-2026-0250
…inal gate) Feature: FEAT-LOOP-2026-0250
… operator, re-armed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Feature: FEAT-LOOP-2026-0250
Feature: FEAT-LOOP-2026-0250/G1-CLOSE
Feature: FEAT-LOOP-2026-0250
Feature: FEAT-LOOP-2026-0250
Feature: FEAT-LOOP-2026-0250
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements FEAT-LOOP-2026-0250: record verification gate results and durations.
What changes
attempt_outcome.duration_secondswas one timer covering the agent session and every verification gate together, so nobody could tell where attempt time went. This feature measures it; it speeds nothing up.gate_resultdriver event, one per gate per run, for all three phases (attempt,baseline,broad):gate,ok,skipped,duration_seconds,phase, andattempt(null outside the attempt phase). Registered indriver-event.schema.json. A gate skipped because a dependency failed recordsok: false,skipped: true,duration_seconds: 0.attempt_outcomegainsagent_secondsandverify_seconds.duration_secondskeeps its meaning (the total); the remainder is driver overhead. An attempt that never reached verification recordsverify_seconds: 0.specfuse stats(text and--json) reports the agent/verify split per feature and the slowest gates (runs, total, median, max). A corpus without the new fields reads "not recorded", never zeros.docs/methodology.mdgains a short Timings paragraph (packaged copy synced).Pass/fail logic is unchanged:
_run_gate_set()computesokexactly as before and only adds keys beside it;verify()still decides onall(g["ok"]);gate_resultis read only byevents_stats.py. The terminal judge-editing stop fired onloop.pyand the event schema, and was acknowledged by the operator onG1-CLOSE.Verification
python3 -m unittest tests.test_gate_timings -v -bgreen, no survivingunittest.skip.codegate set) clean; full suite passed locally.met.Not verified in-loop (see
RETROSPECTIVE.md)agent_secondson a realclaude -pdispatch is unobserved (post-merge checklist).specfuse statson the external corpus that motivated the feature (post-merge checklist).run()wiring of attempt- and baseline-phase events has no test; only the broad-phase events were observed live (18 events in this feature'sevents.jsonl).duration_secondskeeps its meaning; events from killed attempts are lost (out of scope by plan).Pending learnings (needs promotion)
From
.specfuse/features/FEAT-LOOP-2026-0250-gate-timings/LEARNINGS-pending.md:[FEAT-LOOP-2026-0250/T04] A unit that edits
docs/*.mdmust also refresh that file's packaged copy underspecfuse/loop/data/docs/in the same unit. T04 editeddocs/methodology.mdand not its packaged copy; its narrow tier selected no docs-sync test, so it passed, and three docs-sync tests went red only in the gate's broad run. Runscripts/sync-scaffold.shbefore reporting, and list the packaged copy inproduces:so the diff guard sees it.[FEAT-LOOP-2026-0250/T01] A test that validates events through
validate_eventmust pin the real packaged schemas and clear the validator's module caches.test_emitted_events_validatepassed alone and failed in the full suite because an earlier test left_DRIVER_EVENT_TYPES_CACHEempty, dropping every driver event type from the enum. Copy the pinning fromtests/test_event_gate_full_envelope.pywhen writing the test, not after the broad run fails.Promotion is a step for the reviewer: read each entry, copy the accepted ones into
.specfuse/LEARNINGS.md, leave rejected ones in the pending file with a note, and remember planning never readsLEARNINGS-pending.mddirectly, so an unpromoted entry is lost.🤖 Generated with Claude Code